package com.handpay.nocardpay.baselibrary.main.all.model.bean;

import android.os.Parcel;

import com.handpay.nocardpay.baselibrary.commbase.model.bean.BaseResponseBean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by lyang on 2018/2/2.
 */

public class BannerByChannelBean extends BaseResponseBean {


    /**
     * items : 2
     * list : [{"bannerId":"00303","bannerLink":"http://nav.aijidun.com","bannerLinkType":"1","bannerPath":"http://pic.handpay.cn/hpay/micro/banner/MPOSBanners/BannerResources/miaodai.jpg","bannerType":"0","lastUpdateTime":"20180202160201","linkTitle":"极速秒贷","microImageUrl":"http://pic.handpay.cn/hpay/micro"},{"bannerId":"00281","bannerLink":"https://shop.haiercash.com/static/gh/appRegister.html?source=zhaosheng_21","bannerLinkType":"1","bannerPath":"http://pic.handpay.cn/hpay/micro/banner/MPOSBanners/BannerResources/haier.png","bannerType":"0","lastUpdateTime":"20180202160136","linkTitle":"海尔金融","microImageUrl":"http://pic.handpay.cn/hpay/micro"}]
     */

    private String items;
    private List<ListBean> list;

    public String getItems() {
        return items;
    }

    public void setItems(String items) {
        this.items = items;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean extends BaseResponseBean {

        @Override
        public String toString() {
            return "ListBean{" +
                    "bannerId='" + bannerId + '\'' +
                    ", bannerLink='" + bannerLink + '\'' +
                    ", bannerLinkType='" + bannerLinkType + '\'' +
                    ", bannerPath='" + bannerPath + '\'' +
                    ", bannerType='" + bannerType + '\'' +
                    ", lastUpdateTime='" + lastUpdateTime + '\'' +
                    ", linkTitle='" + linkTitle + '\'' +
                    ", microImageUrl='" + microImageUrl + '\'' +
                    '}';
        }

        /**
         * bannerId : 00303
         * bannerLink : http://nav.aijidun.com
         * bannerLinkType : 1
         * bannerPath : http://pic.handpay.cn/hpay/micro/banner/MPOSBanners/BannerResources/miaodai.jpg
         * bannerType : 0
         * lastUpdateTime : 20180202160201
         * linkTitle : 极速秒贷
         * microImageUrl : http://pic.handpay.cn/hpay/micro
         */

        private String bannerId;
        private String bannerLink;
        private String bannerLinkType;
        private String bannerPath;
        private String bannerType;
        private String lastUpdateTime;
        private String linkTitle;
        private String microImageUrl;

        public String getBannerId() {
            return bannerId;
        }

        public void setBannerId(String bannerId) {
            this.bannerId = bannerId;
        }

        public String getBannerLink() {
            return bannerLink;
        }

        public void setBannerLink(String bannerLink) {
            this.bannerLink = bannerLink;
        }

        public String getBannerLinkType() {
            return bannerLinkType;
        }

        public void setBannerLinkType(String bannerLinkType) {
            this.bannerLinkType = bannerLinkType;
        }

        public String getBannerPath() {
            return bannerPath;
        }

        public void setBannerPath(String bannerPath) {
            this.bannerPath = bannerPath;
        }

        public String getBannerType() {
            return bannerType;
        }

        public void setBannerType(String bannerType) {
            this.bannerType = bannerType;
        }

        public String getLastUpdateTime() {
            return lastUpdateTime;
        }

        public void setLastUpdateTime(String lastUpdateTime) {
            this.lastUpdateTime = lastUpdateTime;
        }

        public String getLinkTitle() {
            return linkTitle;
        }

        public void setLinkTitle(String linkTitle) {
            this.linkTitle = linkTitle;
        }

        public String getMicroImageUrl() {
            return microImageUrl;
        }

        public void setMicroImageUrl(String microImageUrl) {
            this.microImageUrl = microImageUrl;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            super.writeToParcel(dest, flags);
            dest.writeString(this.bannerId);
            dest.writeString(this.bannerLink);
            dest.writeString(this.bannerLinkType);
            dest.writeString(this.bannerPath);
            dest.writeString(this.bannerType);
            dest.writeString(this.lastUpdateTime);
            dest.writeString(this.linkTitle);
            dest.writeString(this.microImageUrl);
        }

        public ListBean() {
        }

        protected ListBean(Parcel in) {
            super(in);
            this.bannerId = in.readString();
            this.bannerLink = in.readString();
            this.bannerLinkType = in.readString();
            this.bannerPath = in.readString();
            this.bannerType = in.readString();
            this.lastUpdateTime = in.readString();
            this.linkTitle = in.readString();
            this.microImageUrl = in.readString();
        }

        public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
            @Override
            public ListBean createFromParcel(Parcel source) {
                return new ListBean(source);
            }

            @Override
            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeString(this.items);
        dest.writeList(this.list);
    }

    public BannerByChannelBean() {
    }

    protected BannerByChannelBean(Parcel in) {
        super(in);
        this.items = in.readString();
        this.list = new ArrayList<ListBean>();
        in.readList(this.list, ListBean.class.getClassLoader());
    }

    public static final Creator<BannerByChannelBean> CREATOR = new Creator<BannerByChannelBean>() {
        @Override
        public BannerByChannelBean createFromParcel(Parcel source) {
            return new BannerByChannelBean(source);
        }

        @Override
        public BannerByChannelBean[] newArray(int size) {
            return new BannerByChannelBean[size];
        }
    };

    @Override
    public String toString() {
        return "BannerByChannelBean{" +
                "responseCode='" + responseCode + '\'' +
                ", errMessage='" + errMessage + '\'' +
                ", items='" + items + '\'' +
                ", list=" + list +
                '}';
    }
}
